<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                            <i class="fa  fa-fw fa-reorder"></i>员工详情
                        </li>
                    </ol>
                </div>
            </div>
            <div id="page-wrapper">
                <div class="container-fluid col-md-7 col-sx-12">
                    <form method="post" action="/admin_information/edituser">
                        <label><strong><font color="red"><?=$tWord?></font></strong></label>
                        <div class="form-group">
                            <label for="policyno"><strong>属组</strong></label></br>
                            <select name="policygroup" class="form-control-rg">
                                <option value="">属组</option>
                                <?foreach($tPGDatas as $tPGRow){?>
                                <option value="<?=$tPGRow['policygroup']?>" <?if($tPGRow['policygroup'] == $tRow['policygroup']){echo 'selected';}?>><?=$tPGRow['policygroupremak']?></option>
                                <?}?>
                                </select>

                        </div>
                        <div class="form-group">
                            <label for="name"><strong>姓名</strong></label></br>
                            <?=$tRow['insuredname']?>
                        </div>
                        <div class="form-group">
                            <label for="crittype"><strong>证件类型</strong></label></br>
                            <?=$tIdno[$tRow['crittype']]?>
                        </div>
                        <div class="form-group">
                            <label for="critcode"><strong>证件号码</strong></label></br>
                            <?=$tRow['critcode']?>
                        </div>
                        <div class="form-group">
                            <label for="birthday"><strong>出生日期</strong></label>
                            <div >
                                <input class="form-control" size="16" type="text" name="birtday" value="<?=date('Y-m-d',strtotime($tRow['birtday']))?>" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>性别</strong></label></br>
                            <select name="gender" class="form-control-rg">
                                <option value="0" <?if($tRow['gender'] == 0){
                                		echo 'selected';
                                	}?>>男</option>
                                <option value="1" <?if($tRow['gender'] == 1){
                                		echo 'selected';
                                	}?>>女</option>    
                                <option value="9" <?if($tRow['gender'] == 9){
                                		echo 'selected';
                                	}?>>其他</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>客户号</strong></label></br>
                            <?=$tRow['insuredno']?>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>员工工号</strong></label></br>
                            <input type="text" name="jobno" class="form-control"placeholder="请输入您的员工工号" value="<?=$tRow['jobno']?>">
                        </div>
                        <!-- <div class="form-group">
                            <label for="sex"><strong>分单序号</strong></label></br>
                            <input type="text" name="number" class="form-control" placeholder="请输入您的分单序号">
                        </div> -->
                        <div class="form-group">
                            <label for="sex"><strong>保单生效日</strong></label></br>
                            <label name="starttime" value="<?=$tRow['starttime']?>"><?=$tRow['starttime']?></label>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>保单截止日</strong></label></br>
                            <label name="endtime"><?=$tRow['endtime']?></label>
                        </div>
                        <div class="form-group">
                            <label for="area"><strong>地区</strong></label></br>
                            <input type="text" name="medicalarea" class="form-control" value="<?=$tRow['medicalarea']?>" placeholder="请输入地区">
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>机构名称</strong></label></br>
                            <?=$tRow['insurance_name']?>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>机构代码</strong></label></br>
                            <?=$tRow['insuranceno']?>
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>开户银行</strong></label></br>
                            <input type="text" name="bank" class="form-control" placeholder="请输入您的开户银行" value="<?=$tRow['bank']?>">
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>银行账号</strong></label></br>
                            <input type="text" name="accountno" class="form-control" placeholder="请输入您的银行账号" value="<?=$tRow['accountno']?>">
                        </div>
                        <div class="form-group">
                            <label for="sex"><strong>账户名</strong></label></br>
                            <input type="text" name="account" class="form-control" placeholder="请输入您的账户名" value="<?=$tRow['account']?>">
                        </div>
                        <!--<div class="form-group">
                            <label for="sex"><strong>账号</strong></label></br>
                            <input type="text" name="accountno" class="form-control" placeholder="请输入您的账号" value="<?=$tRow['accountno']?>">
                        </div>
-->
                        <div class="form-group">
                            <label for="status"><strong>是否有医保</strong></label></br>
                            <input type="radio" name="ismedical" value='1'<?if($tRow['ismedical'] == 1){?> checked<?}?>> 是&nbsp;&nbsp;&nbsp;
                            <input type="radio" name="ismedical" value='0'<?if($tRow['ismedical'] == 0){?> checked<?}?>> 否
                        </div>
                        <div class="form-group">
                            <label for="location"><strong>工作地</strong></label></br>
                            <input type="text" name="workplace" class="form-control" placeholder="请输入工作地" value="<?=$tRow['workplace']?>">
                        </div>
                        <div class="form-group">
                            <button class="btn btn-primary demo_2" id="submit" type="button">保存</button>
                        </div>
                       <input type='hidden' value='<?=$tPolicyno?>' name='policyno'/>
                       <input type='hidden' value='<?=$tInsuredno?>' name='insuredno'/>
                    </form>
                </div>
            </div>
        <div class="subviews">
            <div class="subviews-container"></div>
        </div>
    </div>
    <!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->
<script type="text/javascript" src="/plugins/jquery-ui-1.11.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script type="text/javascript">
$('.datetimeEnd').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 0,
    format:'yyyy-mm-dd hh:ii',
    pickerPosition: "top-right",
    forceParse: 0
});
</script>
<script type="text/javascript">
$('.form_date').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 0,
    dateStart:'2016-01-01',
    dateEnd:'2050-12-30',
    pickerPosition: "top-right",
    format:'yyyy-mm-dd hh:ii:ss',
    forceParse: 0
});
</script>

<script>
$(function(){
    var options={
        beforeSubmit : showRequest,    // 提交前的回调函数
        success : showResponse,    // 提交后的回调函数
        dataType : "json",    // html（默认）、xml、script、json接受服务器端返回的类型
    }
    function showRequest(formData, jqForm, options){
        return true;
    }
    function showResponse(responseText,statusText){
            cg_alert_edit(responseText,'/admin_information/editpolicy?policyno=<?=$tPolicyno?>','/admin_information/edituser?policyno=<?=$tPolicyno?>&insuredno=<?=$tInsuredno?>');
    }
    $('#submit').click(function() {
        $('form').ajaxSubmit(options);
        return false;

    });
});

</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
